<template>
    <text-item v-if="item.type == 0" :cid="cid" :tid="tid" :item="item" :index="index"></text-item>
    <img-item v-if="item.type == 1" :cid="cid" :tid="tid" :item="item" :index="index"></img-item>
    <gif-item v-if="item.type == 2" :cid="cid" :tid="tid" :item="item" :index="index"></gif-item>
    <subject-item v-if="item.type == 9" :item="item" :index="index"></subject-item>
    <ads-block v-if="item.type == 'ads'" :aid="item.slot" :jid="cid"></ads-block>
</template>

<script>
import VoteView from './VoteView.vue'
import ImgItem from './../listItems/Img.vue'
import SubjectItem from './../listItems/Subject.vue'
import TextItem from './../listItems/Text.vue'
import GifItem from './../listItems/Gif.vue'
import AdsBlock from './../ads/AdsBlock.vue'

export default {
    name: 'ChannelItem',
    components:{
        VoteView,
        ImgItem,
        SubjectItem,
        TextItem,
        GifItem,
        AdsBlock
    },
    props: {
        item: Object,
        index: Number,
        cid: Number,
        tid: Number
    }
}
</script>

<style>
    .c-item{
        margin-bottom: 7px;
        background-color: #fff;
    }

    .c-item:last-child{
        margin-bottom: 0;
    }

    .c-item a{
        display: block;
    }

    .c-item .s-title{
        padding: 0 15px 0 10px;
        border-left: 5px solid #ffb400;
        height: 42px;
        font-size: 15px;
        font-weight: 600;
        line-height: 42px;
        color: #000000;
        background-color: #d5d5d5;
    }

    .c-item .s-intro{
        display: block;
        padding: 12px 15px 24px;
        font-size: 12px;
        line-height: 18px;
        word-wrap: break-word;
        color: #151515;
    }

    .c-item .r-contend{
        padding: 16px 15px 18px;
        font-size: 13px;
        line-height: 24px;
        color: #151515;
    }

    .c-item .info{
        padding: 10px 15px 13px;
    }

    .c-item .r-title{
        font-size: 14px;
        font-weight: 600;
        line-height: 27px;
        color: #373737;
    }

    .c-item .r-intro{
        font-size: 12px;
        line-height: 18px;
        color: #393939;
    }



</style>